﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using taigu.WeChat;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace taigu
{
    public interface IWeChatUserService : ICrudAppService< //Defines CRUD methods
             WeChat.WeChatUserDto, //Used to show books
              Guid, //Primary key of the book entity
              PagedAndSortedResultRequestDto, //Used for paging/sorting
              WeChat.CreateUpdateWeChatUserDto> //Used to create/update a book
    {
        /// <summary>
        /// 用户登录接口
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public Task<ResData<object>> GetLogin(WebChat.WechatDto code);
        /// <summary>
        /// 通过openId获取用户信息接口
        /// </summary>
        /// <param name="openId"></param>
        /// <returns></returns>
        public Task<ResData<object>> GetUserInfo(WebChat.WechatDto openId);

        public Task<ResData<object>> CreateUser(WeChat.CreateWeChatUserDto dto);
        /// <summary>
        /// 抽奖次数
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<ResData<object>> GetDrawCount(WebChat.UserDto m);

        /// <summary>
        /// 发起抽奖接口
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public Task<ResData<object>> CreateDraw(WebChat.UserDto dto);
        /// <summary>
        /// 发起抽奖接口
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public Task<List<ResData<object>>> CreateDrawTest(WebChat.UserDto dto);
        /// <summary>
        /// 获取中奖结果
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public ResData<object> GetDraw(WebChat.UserDto dto);

        public Task<ResData<string>> db_taskAdd(Createdb_taskDTO dbtask);
    }

}
